{literal}
  <script type="text/javascript">
<!--
function confirmDelete(articleId) {
if (confirm("This will delete this sub site. Continue?"))
 {/literal}
document.location = "{$pagename}&action=delete&id=" + articleId;
{literal}
}
//-->
</script>
 {/literal}
{if $action != "Add" && $action != "edit"}
{if $numsites > 0}
<h2>Sub Sites</h2>
<div align="left"><input type="button" class="button" value="Add New Site" onclick="window.location='{$pagename}&amp;action=Add'" /></div>
	<table width="100%" border="0" cellpadding="4" cellspacing="1" class="table">
  <tr>
    <th class="smallhead">Action</th>
    <th width="30%"class="smallhead">Function</th>
    <th class="smallhead">Site Name</th>
  </tr>
  {section name=siteloop loop=$numsites}
  <tr>
    <td width="11%" class="text"><a href="{$pagename}&amp;action=edit&amp;id={$sites[siteloop].id}"><img src="{$tempdir}admin/images/edit.gif" border="0" alt="Edit {$sites[siteloop].name}" title="Edit {$sites[siteloop].name}" /></a> - <a href="javascript:confirmDelete({$sites[siteloop].id})"><img src="{$tempdir}admin/images/delete.gif" border="0" alt="Delete {$sites[siteloop].name}" title="Delete {$sites[siteloop].name}" /></a></td>
	<td class="text"><input type="button" class="button" value="Content Manager" onclick="window.location='admin.php?page=subcontent&amp;site={$sites[siteloop].name}'" /><br /><input type="button" class="button" value="Menu Manager" onclick="window.location='admin.php?page=submenu&amp;site={$sites[siteloop].name}'" /></td>
	<td class="text"><div align="left">{$sites[siteloop].name}</div></td>
  </tr>
  {/section}  
</table>
{else}
<div align="center">There are no sub sites</div>
{/if}
<div align="left"><input type="button" class="button" value="Add New Site" onclick="window.location='{$pagename}&amp;action=Add'" /></div>
{else}
<form name="form1" method="post" action="{$editFormAction}">
  <p align="center">Site Name: 
    <input name="name" type="text" id="name" size="60" maxlength="50" value="{$site.name}" class="inputbox" />
    <input type="submit" name="Submit" value="Submit" class="button">
    <input name="Cancel" type="button" id="Cancel" value="Cancel" onclick="history.go(-1);" class="button" />
    <br>
  </p>
</form>
{/if}
<div align="center">
 <a href="http://www.cmscout.za.net/index.php?page=subsite&amp;site=Manual&amp;content=adminpanel-subsite" target="_blank">Help</a>
</div>
